DIRS = 
DIRS += ../src
DIRS += ../tests
DIRS += ../examples

all : loc make-time make-check-time

.PHONY : loc make-time make-check-time
loc : 
	rm -f loc
	touch loc
	for dir in $(DIRS); do  \
        make -C $$dir clean; \
        ../tools/cloc-1.08.pl --no3 --quiet --out $$dir/loc $$dir; \
        cat $$dir/loc; \
    done

	../tools/cloc-1.08.pl --no3 --quiet --out ./loc $(DIRS) 
	cat ./loc

make-time :
	make -C ../ clean
	time -f "%e elapsed %U user %S system %PCPU" --output=make-time make -C ../ 
	hostname >> make-time
	#cat /proc/cpuinfo >> make-time
	cat ./make-time
	
make-check-time :
	make -C ../ clean
	time -f "%e elapsed %U user %S system %PCPU" --output=make-check-time make -C ../ check 
	hostname >> make-check-time
	#cat /proc/cpuinfo >> make-check-time
	cat ./make-check-time

